﻿import java.util.ArrayList;


public class PrintUtil {
	public static void print(ArrayList<Student> studentList) {
		if(studentList == null || studentList.size() == 0) {
			System.out.println("学生列表为空");
			return;
		}
		
        System.out.print("ID     姓名       年龄       专业       性别\n");
        
        for(int i=0; i<studentList.size(); i++) {
        	Student student = studentList.get(i);        	
        	// 输出每一个数据
            System.out.print(student.getId() + "    ");
            System.out.print(student.getName() + "    ");
            System.out.print(student.getAge() + "    ");
            System.out.print(student.getZy()+"      ");
            System.out.print(student.getSex());
            System.out.print("\n");
        }	
      }
	public static void print1(ArrayList<Course> courseList) {
		if(courseList == null || courseList.size() == 0) {
			System.out.println("课程列表为空");
			return;
		}
		
        System.out.print("课程号      课程名            老师         专业        \n");
        
        for(int i=0; i<courseList.size(); i++) {
        	Course course = courseList.get(i);        	
        	// 输出每一个数据
            System.out.print(course.getKch() + "      ");
            System.out.print(course.getKcm() + "     ");
            System.out.print(course.getLs() + "      ");
            System.out.print(course.getZy() + "      ");
             System.out.print("\n");
        }	
      }
	
	public static void print2(ArrayList<Class1> classList) {
		if(classList == null || classList.size() == 0) {
			System.out.println("班级列表为空");
			return;
		}
		
        System.out.print("班级编号       班级名称        年级         专业\n");
        
        for(int i=0; i<classList.size(); i++) {
        	Class1 class2 = classList.get(i);        	
        	// 输出每一个数据
            System.out.print(class2.getBjbh() + "      ");
            System.out.print(class2.getBjmc() + "     ");
            System.out.print(class2.getNj() + "      ");
            System.out.print(class2.getZy());
            System.out.print("\n");
        }	
      }
	
	public static void print3(ArrayList<Score> scoreList) {
		if(scoreList == null || scoreList.size() == 0) {
			System.out.println("成绩列表为空");
			return;
		}
		
        System.out.print("学号       班级编号       成绩        开课学期\n");
        
        for(int i=0; i<scoreList.size(); i++) {
        	Score score = scoreList.get(i);        	
        	// 输出每一个数据
            System.out.print(score.getId() + "      ");
            System.out.print(score.getKch() + "     ");
            System.out.print(score.getCj() + "      ");
            System.out.print(score.getKkxq() );
            
            System.out.print("\n");
        }	
      }
	
	public static void printMenu(String[] args) {
		System.out.println("************************");
		System.out.println("**** 请输入选择的序号      **");
		System.out.println("******  1 查看学生列表    **");
		System.out.println("******  2 查看课程列表    **");
		System.out.println("******  3 查看班级列表    **");
		System.out.println("******  4 查看成绩列表    **");
		System.out.println("******  5 添加学生              **");
		System.out.println("******  6 删除学生              **");
		System.out.println("******  7 添加课程              **");
		System.out.println("******  8 删除课程              **");
		System.out.println("******  9 添加班级              **");
		System.out.println("******  10 删除班级           **");
		System.out.println("******  11 添加成绩           **");
		System.out.println("******  12 删除成绩            **");
		System.out.println("******  13 更新学生            **");
		System.out.println("******  14 更新课程            **");
		System.out.println("******  15 更新班级            **");
		System.out.println("******  16 更新学生            **");
		System.out.println("******  17 选课                      **");
		System.out.println("******  18 退出程序            **");
		System.out.println("************************");		
		}
	

}



